$.extend(
	$.fn.validatebox.defaults.rules, {
    fixedlength:{
        validator:function(_1f,_20){
			var len=$.trim(_1f).length;
			return len==_20[0];
		},
		message:''
    },
    betweenlength:{
		validator:function(_1f,_20){
			var len=$.trim(_1f).length;
			return len>=_20[0]&&len<=_20[1];
		},
		message:''
	},
	minlength:{
		validator:function(_1f,_20){
			var len=$.trim(_1f).length;
			return len>=_20[0];
		},
        message:''
	},
	maxlength:{
		validator:function(_1f,_20){
			var len=$.trim(_1f).length;
			return len<=_20[0];
		},
		message:''
	},
	between:{
		validator:function(_1f,_20){
			if(!/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(_1f))
				return false;
			var v = parseFloat(_1f);
			var v1 = parseFloat(_20[0]);
			var v2 = parseFloat(_20[1]);
			return v>=v1 && v<=v2;
		},
		message:''
	},
	min:{
		validator:function(_1f,_20){
			if(!/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(_1f))
				return false;
			var v = parseFloat(_1f);
			var v1 = parseFloat(_20);
			return v>=v1;
		},
		message:''
	},
	max:{
		validator:function(_1f,_20){
			if(!/^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(_1f))
				return false;
			var v = parseFloat(_1f);
			var v1 = parseFloat(_20);
			return v<=v1;
			
		},
		message:''
	},
	
	email: {
       validator: function(_lf, _20){
            if (_lf) {
                return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(_lf);
            }
            else {
                return true;
            }
        },
        message: ''
    },
    url: {
        validator: function(_lf,_20){
            if (_lf) {
                return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(_lf);
            }
            else {
                return true;
            }
        },
        message: ''
    },
	date: {
		validator:function(_lf, _20) {
			if(_lf)
				return !/Invalid|NaN/.test(new Date(_lf));
			else	
				return true;
		},
		message: ''
	},
	dateISO: {
		validator:function(_lf, _20) {
			if(_lf)
				return /^\d{4}[\/-]\d{1,2}[\/-]\d{1,2}$/.test(_lf);
			else
				return true;
		},
		message: ''
	},
	number: {
		validator:function(_lf, _20) {
			if(_lf)
				return /^-?(?:\d+|\d{1,3}(?:,\d{3})+)(?:\.\d+)?$/.test(_lf);
			else
				return true;
		},
		message: ''
	},
	digits: {
		validator:function(_lf, _20) {
			if(_lf)
				return /^\d+$/.test(_lf);
			else
				return true;
		},
		message: ''
	},
	creditcard: {
		validator:function(_lf, _20) {
			if (_lf) {
				if (/[^0-9-]+/.test(_lf)) 
					return false;
				var nCheck = 0, nDigit = 0, bEven = false;
				
				_lf = _lf.replace(/\D/g, "");
				
				for (var n = _lf.length - 1; n >= 0; n--) {
					var cDigit = _lf.charAt(n);
					var nDigit = parseInt(cDigit, 10);
					if (bEven) {
						if ((nDigit *= 2) > 9) 
							nDigit -= 9;
					}
					nCheck += nDigit;
					bEven = !bEven;
				}
				
				return (nCheck % 10) == 0;
			}else
				return true;
		},
		message: ''
	},
	accept: {
		validator:function(_lf, _20) {
			if(_lf){
				var p = typeof _20 == "string" ? _20.replace(/,/g, '|') : "png|jpe?g|gif|bmp";
				return _lf.match(new RegExp(".(" + p + ")$", "i"));
			}else
				return true;
		},
		message:''
	},
	equalTo:{
		validator:function(_lf, _20) {
			return _lf == $(_20[0]).val();
			
		},
		message:''
	},
	attack:{ 
		validator:function(_lf, _20) {
			if(_lf)
				return !/<(img|iframe|script)[\w| ]*(src) *=/.test(_lf);
			else	
				return true; 
		},
		message:''
	},
	chinalaw:{
		validator:function(_lf, _20) {
			if(_lf)
				return !/(法 *轮 *功|独 *立|激 *情|暴 *力|裸 *体)/.test(_lf);
			else
				return true;
		},
		message:''
	},
	idno:{
		validator:function(_lf, _20) {
			if(_lf)
				return /^(\d{6})(18|19|20)?(\d{2})([01]\d)([0123]\d)(\d{3})(\d|X)?$/.test(_lf);
			else
				return true;
		},
		message:''
	},
		
	zipcode:{
		validator:function(_lf, _20) {
			if(_lf)
				return /^\d{6}$/i.test(_lf);
			else
				return true;
		},
		message:''
	},
	telephone:{
		validator:function(_lf, _20) {
			if(_lf)
				return /^0\d{2,3}[1-9]\d{6,7}$/i.test(_lf);
			else
				return true;
		},
		message:''
	},
	ip:{
		validator:function(_lf,_20) {
			if(_lf)
				return /^(([01]\d{2})|(2(([0-4]\d)|5[0-5]))|\d{1,2})(\.(([01]\d{2})|(2(([0-4]\d)|5[0-5]))|\d{1,2})){3}$/i.test(_lf);
			else
				return true;
		},
		message:''
	},
	mobile: {
		validator:function(_lf, _20) {
			if(_lf)
				return /^1[358]\d{9}$/i.test(_lf);
			else
				return true;
		},
		message:''
	}
});

